package chapter7.No7_4_SimpleDateFormat非线程安全.b解决异常方法1;

/**
 * 解决思路：不用单例
 * Created by Administrator on 2016/12/8.
 */
public class Main {
    public static void main(String[] args) {
        String[] dateStrings = {"2016/12/01", "2016/12/02", "2016/12/03", "2016/12/04"
                , "2016/12/05", "2016/12/06", "2016/12/07", "2016/12/08"};
        for (int i = 0; i < 8; i++) {
            MyThread a = new MyThread(dateStrings[i]);
            a.setName("线程"+(i+1));
            a.start();
        }
    }
}
